package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * @program: sky-take-out
 * @description:
 * @author: 酷炫焦少
 * @create: 2024-11-17 21:48
 **/
@Mapper
public interface UserMapper {

    User getOne(User user);

    void saveUser(User user);

    Long queryTotalUserBeforeBeginTime(@Param("begin") LocalDate begin);

    @MapKey("date")
    Map<Date, Map<String, Object>> queryNewUserBetweenTime(LocalDateTime begin, LocalDateTime end);

    Integer countByMap(Map map);

}
